var mongoose=require('mongoose');
var User=require('./user');
var Book=require('./book');
var historySchema=mongoose.Schema({
    user:{
        type:mongoose.Schema.ObjectId,
        ref:'User'
    },
    userName:String,
    book:{
        type:mongoose.Schema.ObjectId,
        ref:'Book'
    },
    bookTitle:String,
    date:String
});

module.exports=mongoose.model('History',historySchema);